1. Field of the Invention
The invention relates to a handheld scanner, more particularly to a lost scan line detecting method and device for a handheld scanner.
2. Description of the Related Art
Handheld scanners are widely used in office automation and are applied in picture processing and in character recognition operations. When activated, the handheld scanner generates a light output which is reflected by the document being scanned. The reflected light is received by a charge coupled device (CCD) and is converted into a corresponding analog voltage signal. The analog voltage signal is then processed by an image processing circuit and is converted into a digital bit stream which serves as scan line picture data. The computer system stores the received digital bit stream in a display memory region, thereby enabling the computer system to show the scanned document on the computer monitor.
The handheld scanner should be moved in a direction which is transverse to the scan line when a document is scanned. The handheld scanner includes a roller mechanism which moves along the document in the transverse direction. The roller mechanism rotatably drives a speed reducing gear unit which is connected to a photo interrupter that is provided between a photo emitter and a photo receiver. Movement of the roller mechanism therefore causes the photo receiver to generate a series of pulse signals. Each pulse signal is used to indicate that the roller mechanism has moved by a distance which corresponds to one scan line on the document being scanned. During the period between two pulse signals, the light received by the CCD should have been converted into a digital bit stream and transmitted to the scanner interface card. Otherwise, overlapping of two scan lines will occur.
Therefore, the period (also known as the accumulation period) which starts when light is converted into a digital signal and which ends when the digital signal is transmitted to the scanner interface card should be less than that between two pulse signals from the photo receiver. However, since the handheld scanner is manually driven, the speed of the roller mechanism is not constant, thereby possibly resulting in the generation of two pulse signals within the accumulation period to result correspondingly in lost scan lines and inferior picture quality of the scanned document shown on the computer monitor.
Referring to FIG. 1, a conventional handheld scanner generates a step trigger (ST) signal after one of the photo receiver pulses and an address reset (AR) signal which is used to indicate that a new line is to be scanned. The period between two step trigger (ST) signals and that between two address reset (AR) signals is constant and corresponds to a predetermined maximum scanning speed of the handheld scanner. It is possible to have a plurality of scanning periods between two step trigger (ST) signals. However, each scanning period should correspond to the same scan line. The computer system receives the scan line picture data which corresponds to the first scanning period and disregards the rest. If the picture data of the scanning periods are the same, this means that the speed of the roller mechanism is lower than the maximum scanning speed. No lost scan lines will occur under this condition.
Note that only one step trigger (ST) signal is present even if two or more photo receiver pulses are generated during the period between two address reset (AR) signals. The presence of two or more photo receiver pulses during the period between two address reset (AR) signals indicates that the speed of the roller mechanism is greater than the maximum scanning speed. The picture data (Vd) corresponding to only one of the photo receiver pulses is considered, while the rest are disregarded, thereby resulting in lost scan lines.
The scanner interface card of the handheld scanner is usually provided with a data buffer in order to overcome incompatibilities between the read cycle of the computer system and the scanning speed. If the computer system is burdened with several tasks, it is possible that the computer system will not be able to retrieve timely the scan line picture data which were stored in the data buffer. The data buffer is eventually filled and will not be able to receive additional data. Succeeding scan line picture data are not stored and are thus lost.